.topbar {
  width: 100%;
  position: relative;
  top: 0;
  height: 60px;
  z-index: 100;
  // box-shadow: 0 2px 15px 0 rgba(0, 0, 0, 0.05);
  box-shadow: none;

  @include themify($themes) {
    background: #247BA0;
  }

  .topbar__wrapper-centered {
    position: relative;
    display: flex;
    height: 60px;
    // max-width: 1060px;
    margin: auto;
  }

  .topbar__wrapper {
    position: relative;
    display: flex;
    height: 60px;
    // max-width: 1060px;
    margin: auto;
  }

  .topbar__button {
    // width: 60px;
    padding-left: 20px;
    height: 60px;
    display: flex;
    background: transparent;
    border: none;
    cursor: pointer;

    &:focus {
      outline: none;
    }

    &:hover {

      .topbar__button-icon {
        fill: #fff;
      }
    }

    &.topbar__button--desktop {
      display: none;
    }
  }

  .topbar__button-icon {
    margin: auto;
    transition: all 0.3s;

    @include themify($themes) {
      fill: #fff;
    }
  }

  .topbar__logo {
    width: 200px;
    height: 32px;
    margin: auto 0;
    background-repeat: no-repeat;
    background-position-y: center;
    background-position-x: left;
    background-size: contain;
    display: block;
    font-size: 20px;
    color: #fff;
    margin-top: 14px;
    margin-left: 0px;


    // @include themify($themes) {
    //   background-image: themed('logoImg');
    // }

    // @media screen and (max-width: 576px) {
    //   // margin-top: 17px;
    //   font-size: 16px;
    //   margin-left: 0px;
    //   font-weight: 600;
    // }
  }

  .topbar__right {
    position: absolute;
    right: 0;
    display: flex;
    height: 100%;
    z-index: 1;
    // margin-right: 15px;
  }

  .topbar__center {
    position: absolute;
    // left: 0;
    justify-content: center;
    display: flex;
    height: 100%;
    width: 100%;
    font-size: 16px;
    font-weight: 700;
    margin-top: 18px;
  }

  .topbar__left {
    position: absolute;
    left: 0;
    display: flex;
    height: 100%;
    width: 60%;
    z-index: 1;
  }

  .topbar__avatar {
    height: 100%;
    display: flex;
    cursor: pointer;
    position: relative;
    border-radius: 0;
    border: none;
    transition: all 0.3s;
    box-shadow: none;
    padding: 0 15px;
    // padding: 0px;
    color: #fff;
    background-color: transparent;

    &:hover, &:focus, &:active, &:focus:active {
      outline: none;
      // color: $color-fintrux;
      color: #fff;
      background: transparent !important;
    }

    &:focus {
      outline: none;
      background: transparent;
    }

    &:before {
      display: none;
    }
  }

  .topbar__avatar-img, .topbar__avatar-name, .topbar__avatar-icon {
    margin: auto 0;
  }

  .topbar__avatar-img {
    border-radius: 50%;
    height: 36px;
    width: 36px;
    margin-right: 10px;
  }

  .topbar__avatar-name {
    font-size: 13px;
    line-height: 18px;
    font-weight: 600;
    display: none;

    @include themify($themes) {
      color: themed('colorText');
    }
  }

  .topbar__avatar-icon {
    opacity: 0.3;
    margin-left: 8px;

    @include themify($themes) {
      fill: themed('colorText');
      height: 18px;
      margin-top: auto;
    }
  }

  .topbar__menu {
    width: 100%;
    min-width: 190px;
    border-radius: 5px !important;
    // border: 1px solid transparent !important;
    border: none !important;
    padding: 5px 0 !important;
    box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.15);
    margin-top: 0;
    top: 10px !important;
    right: auto !important;
    left: auto !important;
    animation: none !important;

    @include themify($themes) {
      background: themed('colorBackground');
    }

    button {
      padding: 0;

      &:hover {
        @include themify($themes) {
          background-color: themed('colorHover');
        }
      }
    }

    *:focus {
      outline: none;
    }
  }

  .topbar__link {
    display: flex;
    padding: 9px 12px;
    transition: all 0.3s;
    height: 32px;
    width: 100%;
    position: relative;
    cursor: pointer;

    @include themify($themes) {
      color: themed('colorText');
    }

    &:before {
      content: "";
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 2px;
      background: transparent;
      opacity: 0;
      transition: all 0.3s;
    }

    &:hover {
      @include themify($themes) {
        background-color: #f0f1f6;
      }

      &:before {
        opacity: 1;
      }
    }
  }

  .topbar__link-title {
    position: absolute;
    margin: 0;
    font-size: 14px;
    line-height: 14px;
  }

  .topbar__link-icon {
    margin-right: 10px;
    font-size: 13px;
    line-height: 13px;

    @include themify($themes) {
      color: themed('colorIcon');
    }
  }

  .topbar__menu-divider {
    margin: 15px 0;

    @include themify($themes) {
      border-top-color: themed('colorBorder');
    }
  }

  .topbar__profile {
    margin-bottom: 0;
    margin-left: 20px;
  }

  .topbar__btn {
    font-size: 18px;
    height: 100%;
    padding: 0 10px;
    cursor: pointer;
    position: relative;
    display: flex;
    border: none;
    background: transparent;
    transition: all 0.3s;

    @include themify($themes) {
      color: themed('colorText');
    }

    &:hover {

      @include themify($themes) {
        background-color: themed('colorHover');
      }
    }

    span {
      margin: auto;
      height: 18px;
    }

    &.topbar__btn--new {

      .topbar__btn-new-label {
        position: absolute;
        right: 9px;
        top: 20px;

        & > div {
          position: relative;

          &:before {
            background-color: rgba(224, 83, 111, 0.2);
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            animation: beforePulse 1.5s infinite;
          }

          &:after {
            height: 7px;
            width: 7px;
            background-color: #e0536f;
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            border-radius: 50%;
            transform: translate(-50%, -50%);
          }
        }
      }
    }

    @keyframes beforePulse {
      from {
        width: 7px;
        height: 7px;
      }
      25% {
        width: 13px;
        height: 13px;
      }
      to {
        width: 7px;
        height: 7px;
      }
    }
  }

  .topbar__search {
    display: none;
  }

  .topbar__search-field {
    width: 0;
    transition: all 0.3s;
    margin: auto;
    opacity: 0;

    &.topbar__search-field--open {
      width: 300px;
      opacity: 1;
    }
  }

  .topbar__nav {
    width: 100%;
    display: none;
    height: 100%;
    justify-content: center;
    align-items: center;
  }

  .topbar__nav-dropdown-toggle {
    height: 60px;
    background: transparent;
    border-radius: 0;
    border: none;
    font-size: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;

    @include themify($themes) {
      color: themed('colorText');
    }

    &:before {
      display: none;
    }

    &:hover, &:focus, &:active, &:focus:active {

      @include themify($themes) {
        background-color: themed('colorHover');
      }
    }

    svg {
      fill: $color-additional;
      margin-left: 3px;
      height: 16px;
      width: 16px;
      margin-right: 0;
    }
  }

  .topbar__nav-dropdown-menu {
    width: 240px;
    border-top: 2px solid $color-accent;

    button {
      padding: 0;
    }
  }

  .topbar__link-badge {
    width: 26px;
    height: 14px;
    background-color: $color-red;
    font-size: 8px;
    font-weight: 400;
    padding: 2px;
    margin-left: 5px;
    line-height: 9px;
    position: relative;
    text-transform: uppercase;
    border-radius: 7px;

    span {
      position: absolute;
      left: 0;
      top: 3px;
      width: 26px;
      text-align: center;
    }
  }

  .topbar__nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    // padding: 20px 15px;
    padding: 18px 15px;
    transition: 0.3s;
    font-size: 14px;

    @include themify($themes) {
      color: #fff;
    }

    &:hover {

      @include themify($themes) {
        // background-color: themed('colorHover');
        color: #fff;
      }
    }
  }

  .topbar__category-wrap{
    position: relative;

    &:hover{

      .topbar__submenu{
        opacity: 1;
        width: auto;
        height: auto;
      }
    }
  }

  .topbar__category-icon{
    position: absolute;
    right: 20px;
    font-size: 10px;
    line-height: 14px;

    @include themify($themes) {
      color: themed('colorIcon');
    }
  }

  .topbar__submenu{
    position: absolute;
    right: 1px;
    top: 0;
    transform: translateX(100%);
    transition: 0.3s;
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;

    @include themify($themes) {
      background-color: themed('colorHover');
    }

    .topbar__link{

      &:hover{

        @include themify($themes) {
          background-color: themed('colorBackground');
        }
      }
    }
  }

  @media screen and (max-width: 360px) {

    .topbar__avatar-name {
      display: block;
    }

    .topbar__search {
      display: flex;
    }

    .topbar__menu {
      width: 100%;
      min-width: 190px;
      right: auto !important;
      left: auto !important;
    }
  }

  @media screen and (min-width: 1060px) {

    .topbar__button {

      &.topbar__button--desktop {
        display: block;
      }

      &.topbar__button--mobile {
        display: none;
      }
    }

    &.topbar--navigation {

      .topbar__button.topbar__button--mobile {
        display: block;
      }
    }
  }

  @media screen and (min-width: 992px) {

    .topbar__nav {
      display: flex;
    }

    &.topbar--navigation {

      .topbar__logo {
        margin-left: 15px;
        display: block;
      }

      .topbar__button.topbar__button--mobile {
        display: none;
      }

      .topbar__avatar-name{
        display: none;
      }

      .topbar__profile{
        margin-left: 0;
      }
    }
  }

  @media screen and (min-width: 1060px) {

    &.topbar--navigation {

      .topbar__avatar-name{
        display: block;
      }
    }
  }

  // @media screen and (min-width: 1580px) {
  //
  //   .topbar__nav-dropdown-toggle, .topbar__nav-link{
  //     width: 240px;
  //   }
  // }
}
